<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<!--<script src="https://unpkg.com/vue/dist/vue.js"></script>-->
<script src="js/jquery-1.8.0.min.js"></script>
<script src="js/vue.min.js"></script>
</head>
<body>
<!--<div id="app">
 <!-- <p>{{ message }}</p>-->
  <!--<div v-html="message"></div>
  <label for="r1">修改颜色</label><input type="checkbox" v-model="class1" id="r1">
  <br><br>
  <div v-bind:class="{'class1': class1}">
    directiva v-bind:class
  </div>
</div>
<div id="app1">
    {{5+5}}<br>
    {{ ok ? 'YES' : 'NO' }}<br>
    {{ message.split('').reverse().join('') }}
    <div v-bind:id="'list-' + id">菜鸟教程</div>
</div>-->
<div id="app2">
	<p>{{ message1 }}</p>
    <button v-on:click="reverseMessage">反转字符串</button>
</div>
<script>
/*new Vue({
  el: '#app',
  data: {
    /*message: 'Hello Vue.js!'*/
   /*message:'<h1>初学VUE！</h1>'
  class1:false
  }
});
new Vue({
  el: '#app1',
  data: {
    ok: true,
    message: 'RUNOOB',
    id : 1
  }
});*/
new Vue({
  el: '#app2',
  data: {
    message1: 'sansi!',
  },
    methods: {
    reverseMessage: function () {
      this.message1 = this.message1.split('').reverse().join('')
    }
  }
})
</script>
</body>
</html>
